﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows;
using System.Windows.Data;
using System.ComponentModel;

namespace IronCommander.Controls
{
    public class GridViewImageColumn : GridViewColumn
    {
        readonly FrameworkElementFactory elementFactory = new FrameworkElementFactory(typeof(Image));

        public BindingBase SourceBinding
        {
            set { elementFactory.SetBinding(Image.SourceProperty, value); }
        }

        public GridViewImageColumn()
        {
            CellTemplate = new DataTemplate { VisualTree = elementFactory };
        }
    }
}
